
package com.crowdfunding.circle.config.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.crowdfunding.circle.common.dao.BaseDao;
import com.crowdfunding.circle.config.param.ConfigInfoParam;
import com.crowdfunding.circle.config.vo.ConfigInfoVO;

/**
 * 配置信息Dao实现类
 *
 * @author 朱国军
 * @version 2015年12月21日 朱国军
 */
@Repository("configInfoDao")
public class ConfigInfoDao extends BaseDao<ConfigInfoVO> {
    
    public Integer insert(ConfigInfoVO entity) {
        return this.getSqlSession().insert("insertConfigInfo", entity);
    }
    
    public Integer update(ConfigInfoVO entity) {
        return this.getSqlSession().update("updateConfigInfoById", entity);
    }
    
    public ConfigInfoVO findById(String id) {
        return this.getSqlSession().selectOne("selectConfigInfoById", id);
    }
    
    public List<ConfigInfoVO> queryByPage(ConfigInfoParam param) {
        return super.queryList("selectConfigInfoList", param);
    }
    
    public List<ConfigInfoVO> queryConfigList(ConfigInfoParam param) {
        return this.getSqlSession().selectList("selectConfigInfoList", param);
    }
    
    public Integer queryConfigCount(ConfigInfoParam param) {
        return this.getSqlSession().selectOne("selectConfigInfoList_count", param);
    }
    
    public void delete(String id) {
        this.getSqlSession().delete("deleteConfigInfoById", id);
    }
}
